<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>智慧生活 | 感谢有你</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="${rc.contextPath}/static/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="${rc.contextPath}/static/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="${rc.contextPath}/static/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="${rc.contextPath}/static/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="${rc.contextPath}/static/dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="${rc.contextPath}/static/plugins/datatables/dataTables.bootstrap.css">
    <link rel="stylesheet" href="${rc.contextPath}/static/plugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="${rc.contextPath}/static/plugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="${rc.contextPath}/static/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">

</head>
<!-- ADD THE CLASS fixed TO GET A FIXED HEADER AND SIDEBAR LAYOUT -->
<!-- the fixed layout is not compatible with sidebar-mini -->
<body class="hold-transition skin-blue fixed sidebar-mini">
<#include "/templete/templete.ftl"/>

<!-- Site wrapper -->
<div class="wrapper">
    <!-- 引入导航栏和菜单栏-->
    <@header/>
    <!-- =============================================== -->
    <!-- 主界面 -->
    <div class="content-wrapper">
        <section class="content">
            <div class="box">


            </div>
        </section>
    </div>
    <!-- =============================================== -->
    <!-- 引入底部-->
    <@footer/>
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="${rc.contextPath}/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="${rc.contextPath}/static/bootstrap/js/bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="${rc.contextPath}/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="${rc.contextPath}/static/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="${rc.contextPath}/static/dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="${rc.contextPath}/static/dist/js/demo.js"></script>
<script src="${rc.contextPath}/static/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="${rc.contextPath}/static/plugins/daterangepicker/moment.min.js"></script>
<script src="${rc.contextPath}/static/plugins/daterangepicker/daterangepicker.js"></script>
<script src="${rc.contextPath}/static/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="${rc.contextPath}/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${rc.contextPath}/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="${rc.contextPath}/static/dist/js/html5shiv.min.js"></script>
<script src="${rc.contextPath}/static/dist/js/respond.min.js"></script>
<script src="${rc.contextPath}/static/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="${rc.contextPath}/static/js/fromtojson.js"></script>
<script>
    $(function () {
        function init() {
            $("#compose-textarea").wysihtml5();
        }

        $(function () {
            init();
        })
        $("#saveBlog").click(function () {
            var fromId = "";
            var requestUrl = "${rc.contextPath}/myBlog/writeBlog/saveBlog";
            var param = formToJson("writeBlogForm");
            $.ajax({
                url: requestUrl,
                type: "post",
                data: param,
                async: false,
                success: function (data) {
                    if (data != "") {
                        alert("博客发布成功，稍后将跳转至博客界面！");
                        window.location.href = "${rc.contextPath}/myBlog/showMyBlog?titleId=" + data;
                    }
                    else {
                        alert("对不起，好像除了一些状况呢！")
                    }
                }
            });
        });
    });
</script>
</body>
</html>
